#ifndef READFILE_H
#define READFILE_H
///************************************************///
/*
 * 文件读取，查找文件
 *
 * https://www.cnblogs.com/xinxue/p/6840315.html
 * https://blog.csdn.net/luoyayun361/article/details/80288610
 *
 **************************************************///
#include <QMap>
#include <QObject>
#include <filewatch.h>
#include "qmltableview.h"
class ReadFile : public QObject
{
    Q_OBJECT

public:

    explicit ReadFile(QObject *parent = 0);

signals:

    void sigShowResult(pRowData rowData);
    void sigShowMsg(const QString msgStr, int falg);

public slots:

    void sltFileChange(const QStringList filePathList, FileWatch::FileState flag);

    void sltSearchFile(const QString searchData);

private:

    void initFileWatch();

    void delayms(int ms);

    FileWatch *m_pFileWatch;

    QMap<QString, QString> m_FileDataList;

};

QMap<QString, QString> loadAllFiles(const QStringList filePathList);

#endif // READFILE_H
